package test;

public class Computer {
    private String name;
    private class CPU{
        private int num = 4;
        private void open(){
            System.out.println("打开主板");
        }
        private void close(){
            System.out.println("关闭主板");
        }
        private void run(){
            System.out.println("运行中...");
        }
    }
    public void operate(String person){
        if(person.equals("硬件修理员")){
            CPU c = new CPU();
            c.open();
            System.out.println("修理中......");
            c.close();
            c.run();
        }else{
            System.out.println("无权访问");
        }
    }
}
class HardwareRepairman{
    public static void main(String[] args){
        Computer c = new Computer();
        c.operate("硬件修理员");
        c.operate("软件开发工程师");
    }
}